package org.conan.groupapp.framework.dao;

import java.util.List;
import java.util.Map;

import org.conan.groupapp.framework.entity.ParamBean;
/**
 * 
 * @author Administrator
 *
 * @param <T>
 */
public interface IBaseDao<T extends ParamBean> {
	/**
	 * 
	 * @param t
	 * @return
	 * @throws Exception
	 */
	public String insert(T t) throws Exception;
	/**
	 * 
	 * @param t
	 * @return
	 * @throws Exception
	 */
	public int updateByPrimaryKey(T t) throws Exception;
	/**
	 * 
	 * @param t
	 * @return
	 * @throws Exception
	 */
	public int deleteByPrimaryKey(Integer primaryKey) throws Exception;
	
	/**
	 * 
	 * @param t
	 * @return
	 * @throws Exception
	 */
	public int deleteByCondition(T t) throws Exception;
	/**
	 * 
	 * @param t
	 * @param rowStart
	 * @param rowEnd
	 * @return
	 * @throws Exception
	 */
	public List<T> selectByCondition(T t,int rowStart, int rowEnd) throws Exception;
	/**
	 * 
	 * @param t
	 * @param rowStart
	 * @param rowEnd
	 * @return
	 * @throws Exception
	 */
	public List<Map> selectMapByCondition(T t,int rowStart, int rowEnd) throws Exception;
	/**
	 * 
	 * @param t
	 * @return
	 * @throws Exception
	 */
	public int countByCondition(T t) throws Exception;
	
	/**
	 * 
	 * @param primaryKey
	 * @return
	 * @throws Exception
	 */
	public T selectByPrimaryKey(Integer primaryKey) throws Exception;
}
